$package('YiYa.employee');
YiYa.employee = function(){
	var _box = null;
	var _this = {
		config:{
  			dataGrid:{
  				title:'续费申请单列表',
	   			url:'ser_company_renew_dataList.do',
	   			columns:[[
						{field:'id',checkbox:true},
						{field:'company_name',title:'单位名称',width:130,
							formatter:function(value,row,index){
				        		  return new Object(row["company"]).name;
						}},
						{field:'ser_company_name',title:'维修公司名称',width:130,
							formatter:function(value,row,index){
				        		  return new Object(row["serCompany"]).name;
						}},
						{field:'duration',title:'续费时长(月)',width:120,sortable:true},
						{field:'applyStatus',title:'状态',width:80,align:'center',sortable:true,
						formatter:function(value,row,index){
							if(value == 1){
								return "通过";
							}else if(value == 2){
								return "不通过";
							}else{
								return "待处理";
							}
						}},
						{field:'createTime',title:'创建时间',width:120,sortable:true}
				]],
				toolbar:[
					{id:'btnadd',text:'申请续费',btnType:'add'},
					{id:'btndelete',text:'删除',btnType:'remove'}
				]
			}
		},
		init:function(){
			//_this.initForm();
			_box = new YDataGrid(_this.config); 
			_box.init();
		}
	}
	return _this;
}();

$(function(){
	YiYa.employee.init();
});		